package com.baosight.risk.service.jlta.impl;

import com.baosight.risk.api.jlta.JltaRebackService;
import com.baosight.risk.base.service.BaseServiceImpl;
import com.baosight.risk.mapper.jlta.JltaRebackMapper;
import com.baosight.risk.service.jlta.entity.JltaReback;
import com.baosight.risk.service.jlta.vo.MutiTeamVO;
import groovy.util.logging.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class JltaRebackServiceImpl extends BaseServiceImpl<JltaReback> implements JltaRebackService {
    @Autowired
    private JltaRebackMapper rebackMapper;

    @Override
    public void doAssignTask(MutiTeamVO vo) {

    }

    @Override
    public void deleteByTaskGuid(String id) {
       rebackMapper.deleteByTaskGuid(id);

    }

    @Override
    public void updateRebackStatus(List<JltaReback> rebacks) {

        rebackMapper.updateRebackStatus(rebacks);
    }

    @Override
    public void updateIsapprovalByIds(List<String> rebackIds, String isapproval) {
        rebackMapper.updateIsapprovalByIds(rebackIds,isapproval);
    }

    @Override
    public JltaReback getReback(JltaReback reback) {
        return rebackMapper.selectByPrimaryKey(reback);
    }

    @Override
    public List<JltaReback> selectRebacklist(JltaReback reback) {
        return rebackMapper.select(reback);
    }

    @Override
    public void saveReback(JltaReback reback) {
        rebackMapper.updateByPrimaryKeySelective(reback);
    }

    @Override
    public List<JltaReback> selectFileList(String id) {
        return rebackMapper.selectFileList(id);
    }
}
